#include "radar_converter.h"
#include <string.h>

RadarConverter::RadarConverter()
    :is_converting_(true), radar_(nullptr), radar_spoke_index_(0)
{
}

RadarConverter::~RadarConverter()
{
    is_converting_ = false;
}


void RadarConverter::add_converter_callback(converter_callback cb)
{
    converter_cbs_.push_back(cb);
}

void RadarConverter::start_callback(void *data)
{
    for (auto iter = converter_cbs_.begin(); iter != converter_cbs_.end(); ++iter)
    {
        (*iter)(data);
    }
}
